package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 优惠管理对象 youxuan_preferential
 * 
 * @author admin
 * @date 2021-01-12
 */
@Data
public class YouxuanPreferential extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键id */
    private Long id;

    /** 优惠类型 */
    @Excel(name = "优惠类型")
    private String type;

    /** 促销活动说明 */
    @Excel(name = "促销活动说明")
    private String description;

    /** 满减条件 */
    @Excel(name = "满减条件")
    private Long condition;

    /** 满减额度 */
    @Excel(name = "满减额度")
    private Long reduction;

    /** 秒杀价格 */
    @Excel(name = "秒杀价格")
    private Long seckillPrice;

    /** 开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    private Date startTime;

    /** 满额送券券 */
    @Excel(name = "满额送券券")
    private Long couponId;

    /** 状态 */
    @Excel(name = "状态")
    private Integer status;

    /** 排序 */
    @Excel(name = "排序")
    private Integer order;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "开始时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
    private Date endTime;

    /** 作用的目标sku的id拼接，以','拼接 */
    @Excel(name = "作用的目标sku的id拼接，以','拼接")
    private String targets;
    private String[] targetsArray;
    /** 图片地址 */
    private String imgUrl;

    /** 新增时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "新增时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtCreate;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date gmtUpdate;


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("type", getType())
            .append("description", getDescription())
            .append("condition", getCondition())
            .append("reduction", getReduction())
            .append("seckillPrice", getSeckillPrice())
            .append("startTime", getStartTime())
            .append("couponId", getCouponId())
            .append("endTime", getEndTime())
            .append("targets", getTargets())
            .append("imgUrl", getImgUrl())
            .append("gmtCreate", getGmtCreate())
            .append("gmtUpdate", getGmtUpdate())
            .toString();
    }
}
